﻿--[[
   @brief    frame_bottom logic for  mianframe right bottom
   @author   harleyxwang
   @version  1.0
   @date     2016-09-13
--]]

frame_bottom_desc =
{
    module_name = 'frame_bottom',
    events = 
    {
        {
            c_event = 
            {
                {
                    id = ierd_tgp.game_library.UPDATE_BRANCH_INFO,
                    callback = "frame_bottom_control.handle_update_branch_info"
                },
                {
                    id  = ierd_tgp.game_library.K_PREUPDATE_RESULT,
                    callback = "frame_bottom_control.update_predownload_result"
                }, 
                {
                    id = ierd_tgp.game_library.K_PREUPDATE_BEGIN,
                    callback = "frame_bottom_control.update_predownload_begin"
                },   
                {
                    id = ierd_tgp.tgp_plugin.RAIL_GAME_DOWNLOAD_DLC_TIPS,
                    callback = "frame_bottom_control.show_game_download_dlc_tips"
                },                
            },
            lua_event = 
            {
                {
                    id  = banner_event.UPDATE_GAME_SERVERS,
                    callback = "frame_bottom_control.update_game_servers"
                },
                {
                    id  = banner_event.UPDATE_GAME_STATE,
                    callback = "frame_bottom_control.update_game_state"
                },
                {
                    id  = banner_event.UPDATE_PLUGIN_STATE,
                    callback = "frame_bottom_control.update_plugin_state"
                },
                {
                    id = banner_event.FOCUS_BANNER_ITEM,
                    callback = "frame_bottom_control.handle_banner_switch"
                },
                {
                    id = frame_bottom_event.CHANGE_GAME_PLUGIN_PANEL,
                    callback = "plugin_tool_panel.change_plugin_panel"
                },
                {
                    id = frame_bottom_event.CHANGE_GAME_PLUGIN_SIMPLE_PANEL,
                    callback = "plugin_tool_simple_panel.change_plugin_simple_panel"
                },
                {
                    id = mainframe_event.OPEN_SOCIAL_PANEL,
                    callback = "frame_bottom_control.open_social_panel"
                },
                {
                    id = frame_bottom_event.PLUGIN_LIFE_CYCLE_EVENT,
                    callback = "frame_bottom_control.switch_to_helper_page"
                },
                {
                    id = banner_event.ZONE_LIST_SHOW,
                    callback = "frame_bottom_view.handle_zone_list_show"
                },
                {
                    id = frame_bottom_event.GIFT_ICON_LAYOUT_EVENT,
                    callback = "gift_op_panel.handle_gift_icon_layout"
                },
                {
                    id = frame_bottom_event.GIFT_WHITE_LIST_CFG,
                    callback = "frame_bottom_view.handle_gift_white_list_rsp"
                },
                {
                    id = main_web_event.ON_JS_CALLBACK_TO_FRAME_BOTTOM,
                    callback = "frame_bottom_control.on_js_callback"
                },
                {
                    id = frame_bottom_event.BRANCH_LIST_SHOW,
                    callback = "frame_bottom_control.handle_branch_list_show"
                },
                {
                    id = frame_bottom_event.PROGRESS_NODE_LAYOUT_EVENT,
                    callback = "wg_frame_bottom_view.handle_progress_node_layout"
                },
                {
                    id = banner_event.UPDATE_BANNER_CONFIG,
                    callback = "frame_bottom_control.handle_update_banner_config"
                },
            },
            reg_service = {
                {
                    id = 'Svr_ShowDlcMgr',
                    callback = "frame_bottom_control.show_dlc_mgr"
                },{
                    id = 'Svr_LaunchGameForDLMgr',
                    callback = "frame_bottom_control.launch_game_for_download_mgr"
                },
                {
                    id = 'Svr_StartTaskForDLMgr',
                    callback = "frame_bottom_control.start_task_for_download_mgr"
                },
                {
                    id = 'Svr_PauseTaskForDLMgr',
                    callback = "frame_bottom_control.pause_task_for_download_mgr"
                },
                {
                    id = 'Svr_CancelTaskForDLMgr',
                    callback = "frame_bottom_control.cancel_task_for_download_mgr"
                },
                {
                    id = 'Svr_ClearProtocolAgree',
                    callback = "frame_bottom_control.clear_protocol_agree"
                },
            },
            listen_broadcast =
            {
                {
                    id = "i_broadcast_social_mainwnd_show",
                    callback = "frame_bottom_control.handle_social_panel_on_show"
                },
                {
                    id = "Msg_MainWndShow",
                    callback = "frame_bottom_control.mainframe_show"
                },
                {
                    id = "i_broadcast_game_base_info_update_finish",
                    callback = "frame_bottom_control.handle_game_base_info_update_finish"
                },
                {
                    id = 'Msg_DownloadMgrModeChange',
                    callback = "frame_bottom_control.on_download_mgr_mode_change"
                },
            },
            lua_file = "frame_bottom\\control.lua"
        }
    }
};
desc_mgr.add(frame_bottom_desc);